package com.wfcm.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;



/**
 * 平台用户信息表
 * 
 * @author xlf
 * @email xlfbe696@gmail.com
 * @date 2018-01-22 13:57:19
 */
public class WfMemberEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//用户账号
	private Integer userid;
	//用户昵称
	private String username;
	//电话
	private String telephone;
	//微信用户唯一标识
	private String identity;
	//密码
	private String userpassword;
	//用户唯一串，用于密码加密
	private String useruuidsalt;
	//二维码
	private String twodimensioncode;
	//用户来源（1.2.）
	private String usersource;
	//用户头像路径
	private String headimage;
	//微信头像路径
	private String wxheadimage;
	//微信openId
    private String wxopenid;
    //微信昵称
    private String wxnikename;
	//头像缩略图
	private String thumbimg;
	//状态（0.停用 1.启用）
	private Integer status;
	//用户邀请码
	private String invitecode;
	//黑名单(1.是 0.否)
	private Integer blackflag;
	//创建时间
	private Date createtime;
	//更新时间
	private Date updatetime;

	private Integer studyTime;

	private String token;

	public JSONObject getJSONObject() {  
        Map<String, Object> map = new HashMap<>();  
        map.put("userid", userid);  
	    map.put("username", username != null ? username : ""); 
	    map.put("telephone", telephone != null ? telephone : "");
	    map.put("identity", identity != null ? identity : "");
	    map.put("headimage", headimage != null ? headimage : "");
	    map.put("thumbimg", thumbimg != null ? thumbimg : "");
	    JSONObject obj = new JSONObject(map);  
	    return obj;  
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public Integer getStudyTime() {
		return studyTime;
	}

	public void setStudyTime(Integer studyTime) {
		this.studyTime = studyTime;
	}

	public String getWxopenid() {
        return wxopenid;
    }

    public void setWxopenid(String wxopenid) {
        this.wxopenid = wxopenid;
    }

    public String getWxnikename() {
        return wxnikename;
    }

    public void setWxnikename(String wxnikename) {
        this.wxnikename = wxnikename;
    }

    public String getWxheadimage() {
		return wxheadimage;
	}

	public void setWxheadimage(String wxheadimage) {
		this.wxheadimage = wxheadimage;
	}

	/**
	 * 设置：用户账号
	 */
	public void setUserid(Integer userid) {
		this.userid = userid;
	}
	/**
	 * 获取：用户账号
	 */
	public Integer getUserid() {
		return userid;
	}
	/**
	 * 设置：用户昵称
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	/**
	 * 获取：用户昵称
	 */
	public String getUsername() {
		return username;
	}
	/**
	 * 设置：电话
	 */
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	/**
	 * 获取：电话
	 */
	public String getTelephone() {
		return telephone;
	}
	/**
	 * 设置：身份证
	 */
	public void setIdentity(String identity) {
		this.identity = identity;
	}
	/**
	 * 获取：身份证
	 */
	public String getIdentity() {
		return identity;
	}
	/**
	 * 设置：密码
	 */
	public void setUserpassword(String userpassword) {
		this.userpassword = userpassword;
	}
	/**
	 * 获取：密码
	 */
	public String getUserpassword() {
		return userpassword;
	}
	/**
	 * 设置：用户唯一串，用于密码加密
	 */
	public void setUseruuidsalt(String useruuidsalt) {
		this.useruuidsalt = useruuidsalt;
	}
	/**
	 * 获取：用户唯一串，用于密码加密
	 */
	public String getUseruuidsalt() {
		return useruuidsalt;
	}
	/**
	 * 设置：二维码
	 */
	public void setTwodimensioncode(String twodimensioncode) {
		this.twodimensioncode = twodimensioncode;
	}
	/**
	 * 获取：二维码
	 */
	public String getTwodimensioncode() {
		return twodimensioncode;
	}
	/**
	 * 设置：用户来源（1.2.）
	 */
	public void setUsersource(String usersource) {
		this.usersource = usersource;
	}
	/**
	 * 获取：用户来源（1.2.）
	 */
	public String getUsersource() {
		return usersource;
	}
	/**
	 * 设置：用户头像路径
	 */
	public void setHeadimage(String headimage) {
		this.headimage = headimage;
	}
	/**
	 * 获取：用户头像路径
	 */
	public String getHeadimage() {
		return headimage;
	}
	/**
	 * 设置：头像缩略图
	 */
	public void setThumbimg(String thumbimg) {
		this.thumbimg = thumbimg;
	}
	/**
	 * 获取：头像缩略图
	 */
	public String getThumbimg() {
		return thumbimg;
	}
	/**
	 * 设置：状态（0.停用 1.启用）
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}
	/**
	 * 获取：状态（0.停用 1.启用）
	 */
	public Integer getStatus() {
		return status;
	}
	/**
	 * 设置：用户邀请码
	 */
	public void setInvitecode(String invitecode) {
		this.invitecode = invitecode;
	}
	/**
	 * 获取：用户邀请码
	 */
	public String getInvitecode() {
		return invitecode;
	}
	/**
	 * 设置：黑名单(1.是 0.否)
	 */
	public void setBlackflag(Integer blackflag) {
		this.blackflag = blackflag;
	}
	/**
	 * 获取：黑名单(1.是 0.否)
	 */
	public Integer getBlackflag() {
		return blackflag;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreatetime() {
		return createtime;
	}
	/**
	 * 设置：更新时间
	 */
	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}
	/**
	 * 获取：更新时间
	 */
	public Date getUpdatetime() {
		return updatetime;
	}

    @Override
    public String toString() {
        return "WfMemberEntity{" +
                "userid=" + userid +
                ", username='" + username + '\'' +
                ", telephone='" + telephone + '\'' +
                ", identity='" + identity + '\'' +
                ", userpassword='" + userpassword + '\'' +
                ", useruuidsalt='" + useruuidsalt + '\'' +
                ", twodimensioncode='" + twodimensioncode + '\'' +
                ", usersource='" + usersource + '\'' +
                ", headimage='" + headimage + '\'' +
                ", wxheadimage='" + wxheadimage + '\'' +
                ", wxopenid='" + wxopenid + '\'' +
                ", wxnikename='" + wxnikename + '\'' +
                ", thumbimg='" + thumbimg + '\'' +
                ", status=" + status +
                ", invitecode='" + invitecode + '\'' +
                ", blackflag=" + blackflag +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                ", studyTime=" + studyTime +
                '}';
    }
}
